/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.tb_fuel_consumption.entity;

import java.util.Date;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.common.utils.ToolsUtil;
import com.thinkgem.jeesite.modules.tb_car_info.entity.TbCarInfo;
import com.thinkgem.jeesite.modules.tb_discharge_cargo_address.entity.TbDischargeCargoAddress;
import com.thinkgem.jeesite.modules.tb_driver.entity.TbDriver;
import com.thinkgem.jeesite.modules.tb_goods.entity.TbGoods;
import com.thinkgem.jeesite.modules.tb_goods_consignment_company.entity.TbGoodsConsignmentCompany;
import com.thinkgem.jeesite.modules.tb_goods_receipt_company.entity.TbGoodsReceiptCompany;
import com.thinkgem.jeesite.modules.tb_loading_address.entity.TbLoadingAddress;
import com.thinkgem.jeesite.modules.tb_waybill.entity.TbWaybill;

/**
 * 油品消耗登记Entity
 * @author ZhangYangZe
 * @version 2017-06-08
 */
public class TbFuelConsumption extends DataEntity<TbFuelConsumption> {
	
	private static final long serialVersionUID = 1L;
	private String waybillId;		// 运单ID
	private String driverId;		// 司机ID
	private String goodName;		// 品名
	private Double weight;		// 数量
	private Double unitPrice;		// 单价
	private Double money;		// 金额
	private Date dateTime;		// 时间
	private String type;		// 油品消耗类型0:公司补油1：加油站加油
	private String state;		// 审核状态
	private String fallContext;	//审核不通过原因
	private String bigPhoto;		// 照片地址
	private String smallPhoto;		// 照片地址(小)
	private Date beginDateTime;		// 开始 时间
	private Date endDateTime;		// 结束 时间
	private String[] bigPhotoArray;
	private String[] smallPhotoArray;
	
	private TbGoods goods;//货物
	public TbGoods getGoods() {
		return goods;
	}

	public void setGoods(TbGoods goods) {
		this.goods = goods;
	}

			//Entity
			private TbWaybill tbWaybill;
			private TbCarInfo tbCarInfo;//车
			private TbDriver tbDriver;//司机
			private TbDriver tbDriverTwo;//司机
			private TbDriver tbDriverThree;//司机
			private TbGoods tbGoods;//货物
			private TbLoadingAddress tbLoadingAddress;//装货地址
			private TbDischargeCargoAddress tbDischargeCargoAddress;//卸货地址
			private TbGoodsConsignmentCompany tbGoodsConsignmentCompany;//托运公司
			private TbGoodsReceiptCompany tbGoodsReceiptCompany;//收货公司
	
	
	public TbFuelConsumption() {
		this.bigPhotoArray = ToolsUtil.strToStrArray(bigPhoto);
		this.smallPhotoArray = ToolsUtil.strToStrArray(smallPhoto);
	}

	public TbFuelConsumption(String id){
		super(id);
	}

	@Length(min=1, max=255, message="运单ID长度必须介于 1 和 255 之间")
	public String getWaybillId() {
		return waybillId;
	}

	public void setWaybillId(String waybillId) {
		this.waybillId = waybillId;
	}
	
	@Length(min=1, max=255, message="司机ID长度必须介于 1 和 255 之间")
	public String getDriverId() {
		return driverId;
	}

	public void setDriverId(String driverId) {
		this.driverId = driverId;
	}
	
	@Length(min=1, max=255, message="品名长度必须介于 1 和 255 之间")
	public String getGoodName() {
		return goodName;
	}

	public void setGoodName(String goodName) {
		this.goodName = goodName;
	}
	
	@NotNull(message="数量不能为空")
	public Double getWeight() {
		return weight;
	}

	public void setWeight(Double weight) {
		this.weight = weight;
	}
	
	public Double getUnitPrice() {
		return unitPrice;
	}

	public void setUnitPrice(Double unitPrice) {
		this.unitPrice = unitPrice;
	}
	
	@NotNull(message="金额不能为空")
	public Double getMoney() {
		return money;
	}
	
	public void setMoney(Double money) {
		this.money = money;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="时间不能为空")
	public Date getDateTime() {
		return dateTime;
	}

	public void setDateTime(Date dateTime) {
		this.dateTime = dateTime;
	}
	
	/**
	 * 0:公司补油1：加油站加油
	 * @return
	 */
	@Length(min=1, max=1, message="油品消耗类型长度必须介于 1 和 1 之间")
	public String getType() {
		return type;
	}
	/**
	 * 0:公司补油1：加油站加油
	 * @param type
	 */
	public void setType(String type) {
		this.type = type;
	}
	
	/**
	 * 审核状态0待审核1审核通过2审核不通过
	 * @return
	 */
	@Length(min=1, max=1, message="审核状态长度必须介于 1 和 1 之间")
	public String getState() {
		return state;
	}
	/**
	 * 审核状态0待审核1审核通过2审核不通过
	 * @return
	 */
	public void setState(String state) {
		this.state = state;
	}
	/**
	 * 审核不通过原因
	 * @return
	 */
	public String getFallContext() {
		return fallContext;
	}
	/**
	 * 审核不通过原因
	 * @return
	 */
	public void setFallContext(String fallContext) {
		this.fallContext = fallContext;
	}

	@Length(min=0, max=1000, message="照片地址长度必须介于 0 和 1000 之间")
	public String getBigPhoto() {
		return bigPhoto;
	}

	public void setBigPhoto(String bigPhoto) {
		this.bigPhoto = bigPhoto;
	}
	
	@Length(min=0, max=1000, message="照片地址(小)长度必须介于 0 和 1000 之间")
	public String getSmallPhoto() {
		return smallPhoto;
	}

	public void setSmallPhoto(String smallPhoto) {
		this.smallPhoto = smallPhoto;
	}
	
	public Date getBeginDateTime() {
		return beginDateTime;
	}

	public void setBeginDateTime(Date beginDateTime) {
		this.beginDateTime = beginDateTime;
	}
	
	public Date getEndDateTime() {
		return endDateTime;
	}

	public void setEndDateTime(Date endDateTime) {
		this.endDateTime = endDateTime;
	}

	public TbWaybill getTbWaybill() {
		return tbWaybill;
	}

	public void setTbWaybill(TbWaybill tbWaybill) {
		this.tbWaybill = tbWaybill;
	}

	public TbCarInfo getTbCarInfo() {
		return tbCarInfo;
	}

	public void setTbCarInfo(TbCarInfo tbCarInfo) {
		this.tbCarInfo = tbCarInfo;
	}

	public TbDriver getTbDriver() {
		return tbDriver;
	}

	public void setTbDriver(TbDriver tbDriver) {
		this.tbDriver = tbDriver;
	}

	public TbDriver getTbDriverTwo() {
		return tbDriverTwo;
	}

	public void setTbDriverTwo(TbDriver tbDriverTwo) {
		this.tbDriverTwo = tbDriverTwo;
	}

	public TbDriver getTbDriverThree() {
		return tbDriverThree;
	}

	public void setTbDriverThree(TbDriver tbDriverThree) {
		this.tbDriverThree = tbDriverThree;
	}

	public TbGoods getTbGoods() {
		return tbGoods;
	}

	public void setTbGoods(TbGoods tbGoods) {
		this.tbGoods = tbGoods;
	}

	public TbLoadingAddress getTbLoadingAddress() {
		return tbLoadingAddress;
	}

	public void setTbLoadingAddress(TbLoadingAddress tbLoadingAddress) {
		this.tbLoadingAddress = tbLoadingAddress;
	}

	public TbDischargeCargoAddress getTbDischargeCargoAddress() {
		return tbDischargeCargoAddress;
	}

	public void setTbDischargeCargoAddress(TbDischargeCargoAddress tbDischargeCargoAddress) {
		this.tbDischargeCargoAddress = tbDischargeCargoAddress;
	}

	public TbGoodsConsignmentCompany getTbGoodsConsignmentCompany() {
		return tbGoodsConsignmentCompany;
	}

	public void setTbGoodsConsignmentCompany(TbGoodsConsignmentCompany tbGoodsConsignmentCompany) {
		this.tbGoodsConsignmentCompany = tbGoodsConsignmentCompany;
	}

	public TbGoodsReceiptCompany getTbGoodsReceiptCompany() {
		return tbGoodsReceiptCompany;
	}

	public void setTbGoodsReceiptCompany(TbGoodsReceiptCompany tbGoodsReceiptCompany) {
		this.tbGoodsReceiptCompany = tbGoodsReceiptCompany;
	}

	public String[] getBigPhotoArray() {
		return bigPhotoArray;
	}

	public void setBigPhotoArray() {
		this.bigPhotoArray = ToolsUtil.strToStrArray(getBigPhoto());
	}

	public String[] getSmallPhotoArray() {
		return smallPhotoArray;
	}

	public void setSmallPhotoArray() {
		this.smallPhotoArray = ToolsUtil.strToStrArray(getSmallPhoto());
	}
		
	
}